package com.baizw.cultivation.module.admin.mapper;

import com.baizw.cultivation.common.authenticate.annotation.DataAuth;
import com.baizw.cultivation.common.authenticate.annotation.EnableDataAuth;
import com.baizw.cultivation.common.page.CustomPage;
import com.baizw.cultivation.module.admin.entity.UserEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;

/**
 * 用户接口
 *
 * @author : baizw
 * Date: 2018/3/7
 * Time: 21:48
 */
@Mapper
@EnableDataAuth({
        @DataAuth(methodName = "selectById", tableAlias = "u")
})
public interface UserMapper extends BaseMapper<UserEntity> {

    /**
     * 根据用户ID查询角色信息
     *
     * @param page 分页参数
     * @return
     */
    CustomPage<UserEntity> listUserByPage(CustomPage<?> page);
}
